package com.wn.purchaeReturn.controller;

import com.wn.purchaeReturn.poitool.MyExcelExportUtil;
import com.wn.purchaeReturn.service.PurchaseBillService;
import com.woniu.common.entity.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: yyc
 * @Date: 2022-04-17-20:13
 * @Description:
 */
@RestController
@RequestMapping("/purchaseBill")
public class PurchaseBillController {
    @Autowired
    private PurchaseBillService purchaseBillService;

    /**
     * 根据ID查询采购单
     * @param id
     * @return
     */
    @GetMapping("/{id}")
    public Result selePurchaseBillid(@PathVariable("id") String id){
        return Result.ok().data("list",purchaseBillService.selectPurchaseBillid(id));
    }

    /**
     * 查询全部的采购单
     * @return
     */
    @GetMapping("")
    public Result seleAllPurchaseBillid(){
        return Result.ok().data("list",purchaseBillService.selectAllPurchaseBillid());
    }

}
